<template>
  <div class="tiny-panel">
    <div class="img">
      <img
        :src="'http://localhost:8888' + songVO.imgUrl"
        alt=""
      />
    </div>
    <div class="title">
      <p>{{ songVO.name }}</p>
      <p>{{ songVO.artist }}</p>
    </div>
  </div>
</template>

<script setup lang="ts">
import type { SongsPageDTO } from '@/types/song'

defineProps<{
  songVO: SongsPageDTO
}>()
</script>

<style scoped>
.tiny-panel {
  display: flex;
  flex-direction: column;
  width: 13em;
  height: 13em;
  background: #9dcf00;
}

.img {
  height: 10em;
}

img {
  width: 100%;
  height: 100%;
}

p:first-child {
  text-align: center;
  font-weight: bold;
  font-size: 1.3em;
}

p:last-child {
  text-align: right;
  font-size: 0.5em;
  margin-right: 0.5em;
}
</style>
